<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Module: Jammit::Helper
  
    &mdash; Jammit
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!Jammit/Helper.html";
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (H)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../Jammit.html" title="Jammit (module)">Jammit</a></span></span>
     &raquo; 
    <span class="title">Helper</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Module: Jammit::Helper
  
  
  
</h1>

<dl class="box">
  
  
    
  
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">lib/jammit/helper.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>The Jammit::Helper module, which is made available to every view, provides
helpers for writing out <span class="caps">HTML</span> tags for asset packages. In development you
get the ordered list of source files &#8212; in any other environment, a link
to the cached packages.</p>

  </div>
</div>
<div class="tags">
  

</div>
  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="DATA_URI_START-constant" class="">DATA_URI_START =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;!--[if (!IE)|(gte IE 8)]&gt;&lt;!--&gt;</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
        <dt id="DATA_URI_END-constant" class="">DATA_URI_END =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;!--&lt;![endif]--&gt;</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
        <dt id="MHTML_START-constant" class="">MHTML_START =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;!--[if lte IE 7]&gt;</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
        <dt id="MHTML_END-constant" class="">MHTML_END =
          
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;![endif]--&gt;</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
    </dl>
  







  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#embedded_image_stylesheets-instance_method" title="#embedded_image_stylesheets (instance method)">- (Object) <strong>embedded_image_stylesheets</strong>(packages, options) </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p><span class="caps">HTML</span> tags for the &#8216;datauri&#8217;, and &#8216;mhtml&#8217; versions of the packaged stylesheets, using conditional comments to load the correct variant.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#html_safe-instance_method" title="#html_safe (instance method)">- (Object) <strong>html_safe</strong>(string) </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#include_javascripts-instance_method" title="#include_javascripts (instance method)">- (Object) <strong>include_javascripts</strong>(*packages) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Writes out the <span class="caps">URL</span> to the bundled and compressed javascript package, except in development, where it references the individual scripts.</p></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#include_stylesheets-instance_method" title="#include_stylesheets (instance method)">- (Object) <strong>include_stylesheets</strong>(*packages) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>If embed_assets is turned on, writes out links to the Data-<span class="caps">URI</span> and <span class="caps">MHTML</span> versions of the stylesheet package, otherwise the package is regular compressed <span class="caps">CSS</span>, and in development the stylesheet URLs are passed verbatim.</p></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#include_templates-instance_method" title="#include_templates (instance method)">- (Object) <strong>include_templates</strong>(*packages) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Writes out the <span class="caps">URL</span> to the concatenated and compiled <span class="caps">JST</span> file &#8212; we always have to pre-process it, even in development.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#individual_stylesheets-instance_method" title="#individual_stylesheets (instance method)">- (Object) <strong>individual_stylesheets</strong>(packages, options) </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p><span class="caps">HTML</span> tags, in order, for all of the individual stylesheets.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#packaged_stylesheets-instance_method" title="#packaged_stylesheets (instance method)">- (Object) <strong>packaged_stylesheets</strong>(packages, options) </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p><span class="caps">HTML</span> tags for the stylesheet packages.</p></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#should_package%3F-instance_method" title="#should_package? (instance method)">- (Boolean) <strong>should_package?</strong> </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="private ">
  <span class="summary_signature">
    
      <a href="#tags_with_options-instance_method" title="#tags_with_options (instance method)">- (Object) <strong>tags_with_options</strong>(packages, options) </a>
    

    
  </span>
  
  
  
  <span class="note title private">private</span>
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Generate the stylesheet tags for a batch of packages, with options, by yielding each package to a block.</p></div></span>
  
</li>

      
    </ul>
  



  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="embedded_image_stylesheets-instance_method">
  
    - (<tt>Object</tt>) <strong>embedded_image_stylesheets</strong>(packages, options)  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p><span class="caps">HTML</span> tags for the &#8216;datauri&#8217;, and &#8216;mhtml&#8217; versions of the packaged
stylesheets, using conditional comments to load the correct variant.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68
69
70
71
72</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_embedded_image_stylesheets'>embedded_image_stylesheets</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_datauri_tags'>datauri_tags</span> <span class='op'>=</span> <span class='id identifier rubyid_tags_with_options'>tags_with_options</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_asset_url'>asset_url</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='comma'>,</span> <span class='symbol'>:css</span><span class='comma'>,</span> <span class='symbol'>:datauri</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
  <span class='id identifier rubyid_ie_tags'>ie_tags</span> <span class='op'>=</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_mhtml_enabled'>mhtml_enabled</span> <span class='op'>?</span>
            <span class='id identifier rubyid_tags_with_options'>tags_with_options</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_asset_url'>asset_url</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='comma'>,</span> <span class='symbol'>:css</span><span class='comma'>,</span> <span class='symbol'>:mhtml</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='op'>:</span>
            <span class='id identifier rubyid_packaged_stylesheets'>packaged_stylesheets</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
  <span class='lbracket'>[</span><span class='const'>DATA_URI_START</span><span class='comma'>,</span> <span class='id identifier rubyid_datauri_tags'>datauri_tags</span><span class='comma'>,</span> <span class='const'>DATA_URI_END</span><span class='comma'>,</span> <span class='const'>MHTML_START</span><span class='comma'>,</span> <span class='id identifier rubyid_ie_tags'>ie_tags</span><span class='comma'>,</span> <span class='const'>MHTML_END</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="html_safe-instance_method">
  
    - (<tt>Object</tt>) <strong>html_safe</strong>(string)  <span class="extras">(private)</span>
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


50
51
52</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 50</span>

<span class='kw'>def</span> <span class='id identifier rubyid_html_safe'>html_safe</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:html_safe</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_html_safe'>html_safe</span> <span class='op'>:</span> <span class='id identifier rubyid_string'>string</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="include_javascripts-instance_method">
  
    - (<tt>Object</tt>) <strong>include_javascripts</strong>(*packages) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Writes out the <span class="caps">URL</span> to the bundled and compressed javascript package,
except in development, where it references the individual scripts.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


27
28
29
30
31
32
33
34
35</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 27</span>

<span class='kw'>def</span> <span class='id identifier rubyid_include_javascripts'>include_javascripts</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_packages'>packages</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_packages'>packages</span><span class='period'>.</span><span class='id identifier rubyid_extract_options!'>extract_options!</span>
  <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='symbol'>:extname</span><span class='op'>=&gt;</span><span class='kw'>false</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_html_safe'>html_safe</span> <span class='id identifier rubyid_packages'>packages</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_pack'>pack</span><span class='op'>|</span>
    <span class='id identifier rubyid_should_package?'>should_package?</span> <span class='op'>?</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_asset_url'>asset_url</span><span class='lparen'>(</span><span class='id identifier rubyid_pack'>pack</span><span class='comma'>,</span> <span class='symbol'>:js</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_packager'>packager</span><span class='period'>.</span><span class='id identifier rubyid_individual_urls'>individual_urls</span><span class='lparen'>(</span><span class='id identifier rubyid_pack'>pack</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='symbol'>:js</span><span class='rparen'>)</span>
  <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_pack'>pack</span><span class='op'>|</span>
    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&lt;script src=\&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pack'>pack</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot;&gt;&lt;/script&gt;</span><span class='tstring_end'>&quot;</span></span>
  <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="include_stylesheets-instance_method">
  
    - (<tt>Object</tt>) <strong>include_stylesheets</strong>(*packages) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>If embed_assets is turned on, writes out links to the Data-<span class="caps">URI</span> and <span class="caps">MHTML</span>
versions of the stylesheet package, otherwise the package is regular
compressed <span class="caps">CSS</span>, and in development the stylesheet URLs are passed verbatim.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


17
18
19
20
21
22
23</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 17</span>

<span class='kw'>def</span> <span class='id identifier rubyid_include_stylesheets'>include_stylesheets</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_packages'>packages</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_packages'>packages</span><span class='period'>.</span><span class='id identifier rubyid_extract_options!'>extract_options!</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_html_safe'>html_safe</span><span class='lparen'>(</span><span class='id identifier rubyid_individual_stylesheets'>individual_stylesheets</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_should_package?'>should_package?</span>
  <span class='id identifier rubyid_disabled'>disabled</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:embed_assets</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:embed_images</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='kw'>false</span><span class='rparen'>)</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_html_safe'>html_safe</span><span class='lparen'>(</span><span class='id identifier rubyid_packaged_stylesheets'>packaged_stylesheets</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_disabled'>disabled</span> <span class='op'>||</span> <span class='op'>!</span><span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_embed_assets'>embed_assets</span>
  <span class='kw'>return</span> <span class='id identifier rubyid_html_safe'>html_safe</span><span class='lparen'>(</span><span class='id identifier rubyid_embedded_image_stylesheets'>embedded_image_stylesheets</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="include_templates-instance_method">
  
    - (<tt>Object</tt>) <strong>include_templates</strong>(*packages) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Writes out the <span class="caps">URL</span> to the concatenated and compiled <span class="caps">JST</span> file &#8212; we always
have to pre-process it, even in development.</p>

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Raises:</p>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="DeprecationError.html" title="Jammit::DeprecationError (class)">DeprecationError</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


39
40
41</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 39</span>

<span class='kw'>def</span> <span class='id identifier rubyid_include_templates'>include_templates</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_packages'>packages</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_raise'>raise</span> <span class='const'>DeprecationError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Jammit 0.5+ no longer supports separate packages for templates.\nYou can include your JST alongside your JS, and use include_javascripts.</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="individual_stylesheets-instance_method">
  
    - (<tt>Object</tt>) <strong>individual_stylesheets</strong>(packages, options)  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p><span class="caps">HTML</span> tags, in order, for all of the individual stylesheets.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


55
56
57</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 55</span>

<span class='kw'>def</span> <span class='id identifier rubyid_individual_stylesheets'>individual_stylesheets</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_tags_with_options'>tags_with_options</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_packager'>packager</span><span class='period'>.</span><span class='id identifier rubyid_individual_urls'>individual_urls</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='symbol'>:css</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="packaged_stylesheets-instance_method">
  
    - (<tt>Object</tt>) <strong>packaged_stylesheets</strong>(packages, options)  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p><span class="caps">HTML</span> tags for the stylesheet packages.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


60
61
62</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 60</span>

<span class='kw'>def</span> <span class='id identifier rubyid_packaged_stylesheets'>packaged_stylesheets</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_tags_with_options'>tags_with_options</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_asset_url'>asset_url</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='comma'>,</span> <span class='symbol'>:css</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="should_package?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>should_package?</strong>  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


46
47
48</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 46</span>

<span class='kw'>def</span> <span class='id identifier rubyid_should_package?'>should_package?</span>
  <span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_package_assets'>package_assets</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='lparen'>(</span><span class='const'>Jammit</span><span class='period'>.</span><span class='id identifier rubyid_allow_debugging'>allow_debugging</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:debug_assets</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="tags_with_options-instance_method">
  
    - (<tt>Object</tt>) <strong>tags_with_options</strong>(packages, options)  <span class="extras">(private)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Generate the stylesheet tags for a batch of packages, with options, by
yielding each package to a block.</p>

  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


76
77
78
79
80
81
82</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/jammit/helper.rb', line 76</span>

<span class='kw'>def</span> <span class='id identifier rubyid_tags_with_options'>tags_with_options</span><span class='lparen'>(</span><span class='id identifier rubyid_packages'>packages</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_packages'>packages</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_package'>package</span><span class='op'>|</span>
    <span class='kw'>yield</span> <span class='id identifier rubyid_package'>package</span>
  <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_package'>package</span><span class='op'>|</span>
    <span class='id identifier rubyid_stylesheet_link_tag'>stylesheet_link_tag</span> <span class='id identifier rubyid_package'>package</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
  <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Wed Oct 28 12:19:04 2015 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.6 (ruby-2.1.3).
</div>

  </body>
</html>